package com.gitee.luosl.cola.lang.function.checked;

import java.util.function.BiConsumer;

public interface CheckedBiConsumer<T1, T2> {

    void accept(T1 t, T2 t2) throws Throwable;

    default BiConsumer<T1, T2> toConsumer() {
        return (t1, t2) -> {
            try {
                accept(t1, t2);
            } catch (Throwable throwable) {
                throw new CheckedException(throwable);
            }
        };
    }
}
